package org.yinweichen.llm_dataset_backend.service;

import org.springframework.data.domain.Page;
import org.springframework.http.ResponseEntity;
import org.yinweichen.llm_dataset_backend.DTO.QuestionSearchRequest;
import org.yinweichen.llm_dataset_backend.DTO.StandardQuestionCreateDTO;
import org.yinweichen.llm_dataset_backend.DTO.StandardQuestionUpdateDTO;
import org.yinweichen.llm_dataset_backend.entity.StandardQuestion;
import java.util.List;

public interface StandardQuestionService {
    ResponseEntity<StandardQuestion> create(StandardQuestionCreateDTO question);
    void update(StandardQuestionUpdateDTO question);

//    ResponseEntity<Void> inactivate(Long id,String version);
//    ResponseEntity<Void> activate(Long id,String version);
    ResponseEntity<StandardQuestion> getById(Long id, String version);
    ResponseEntity<List<StandardQuestion>> findByOriginalQuestion(Long originalId, String version);
    ResponseEntity<List<StandardQuestion>> findQuestionsWithoutAnswers(String version, int page, int size);
    ResponseEntity<List<StandardQuestion>> findAllActive(String version, int page, int size);
    ResponseEntity<List<StandardQuestion>> findInactiveQuestions(String version, int page, int size);

    ResponseEntity<Void> switchActiveStatus(Long id,String version);

    Long countQuestionsWithoutAnswers(String version);
    Long countActiveQuestions(String version);
    Long countInactiveQuestions(String version);
    ResponseEntity<Page<StandardQuestion>> searchQuestions(QuestionSearchRequest searchRequest, int page, int size);

    List<String> getAllCategories(String version);
    void setQuestionCategory(Long questionId, String version, String category);
}
